<template>
	
	<view>
		<view class="add_clue">
			<view class="head_name">
				<image class="ph" src="../../static/ico_head2.png" mode="aspectFill"></image>
				<view class="name">
					<input class="input" placeholder-class="placeholder" type="text" placeholder="请输入学员姓名" />
				</view>
			</view>
			
			<view class="clue_item">
				<view class="name">
					性别
				</view>
				<view class="select" @click="openPicker">
					<view class="text hover">
						请选择
					</view>
					<uv-icon name="arrow-right" color="#BEBEBE" size="24rpx"></uv-icon>
				</view>
			</view>
			<view class="clue_item_age">
				<view class="name">
					年龄/生日
				</view>
				<view class="info">
					<uv-radio-group v-model="radiovalue">
						<view class="age">
							<uv-radio :customStyle="{marginRight: '10rpx'}" name="年龄"></uv-radio>
							<view class="age_name">年龄</view>
							<input class="input" placeholder-class="placeholder" type="text" placeholder="请输入" />
							<view class="age_name">岁</view>
							<input class="input" placeholder-class="placeholder" type="text" placeholder="请输入" />
							<view class="age_name">月</view>
						</view>
						<view class="birthday">
							<uv-radio :customStyle="{marginRight: '10rpx'}" name="出生日期"></uv-radio>
							<view class="birthday_name">
								出生日期
							</view>
							<view class="birthday_time" @click="openBirthday">
								<view class="" v-if="birthdayVal">
									{{$uv.timeFormat(birthdayVal,'yyyy-mm-dd')}}
								</view>
								<view class="" v-else>
									请选择
								</view>
							</view>
							<uv-icon name="arrow-right" color="#BEBEBE" size="24rpx"></uv-icon>
						</view>
					</uv-radio-group>
						
					
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					就读学校
				</view>
				<view class="info">
					<input class="input" placeholder-class="placeholder" type="text" placeholder="请输入" />
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					当前年级
				</view>
				<view class="select" @click="openPicker">
					<view class="text hover">
						请选择
					</view>
					<uv-icon name="arrow-right" color="#BEBEBE" size="24rpx"></uv-icon>
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					爸爸
				</view>
				<view class="info">
					<input class="input" placeholder-class="placeholder" type="text" placeholder="手机号" />
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					妈妈
				</view>
				<view class="info">
					<input class="input" placeholder-class="placeholder" type="text" placeholder="手机号" />
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					家庭住址
				</view>
				<view class="info">
					<input class="input" placeholder-class="placeholder" type="text" placeholder="请输入" />
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					意向级别
				</view>
				<view class="select" @click="openPicker">
					<view class="text hover">
						请选择
					</view>
					<uv-icon name="arrow-right" color="#BEBEBE" size="24rpx"></uv-icon>
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					学生来源
				</view>
				<view class="select" @click="openPicker">
					<view class="text hover">
						请选择
					</view>
					<uv-icon name="arrow-right" color="#BEBEBE" size="24rpx"></uv-icon>
				</view>
			</view>
			<view class="clue_item">
				<view class="name">
					标签
				</view>
				<view class="select" @click="openPicker">
					<view class="text hover">
						请选择
					</view>
					<uv-icon name="arrow-right" color="#BEBEBE" size="24rpx"></uv-icon>
				</view>
			</view>
			
			<view class="remark">
				<view class="name">
					备注
				</view>
				<uv-textarea style="padding:0;font-size:28rpx;" v-model="remark" count maxlength="500" height="300rpx" border="none" placeholder="请输入 （500字以内）"></uv-textarea>
			</view>
			
			<view class="btn_org">
				完成
			</view>
			
		</view>
		
		<uv-picker ref="picker" :columns="columnsPicker" @confirm="confirmPicker"></uv-picker>
		
		<uv-datetime-picker ref="datetimePicker" v-model="birthday" :maxDate="today" mode="date" @confirm="confirmBirthday">
		</uv-datetime-picker>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				columnsPicker: [
					['数据1','数据2','数据3']
				],
				remark:'',
				radiovalue: '年龄',
				birthday: Number(new Date()),
				birthdayVal: '',
				today: Number(new Date())
			}
		},
		onLoad() {

		},
		methods: {
			openBirthday() {
				this.$refs.datetimePicker.open();
			},
			confirmBirthday(e){
				//console.log('confirm', e);
				this.birthdayVal = e.value
			},
			openPicker() {
				this.$refs.picker.open();
			},
			confirmPicker(e){
				
			},
		}
	}
</script>

<style lang="scss" scoped>
.add_clue{
	background: #fff;
	padding-bottom: 40rpx;
	.btn_org{
		margin:20rpx 40rpx 0;
		color:#fff;
		font-size: 28rpx;
		background: #FF8535;
		height: 80rpx;
		border-radius: 8rpx;
		line-height: 80rpx;
		text-align: center;
	}
	.remark{
		padding:10rpx 60rpx;
		.name{
			flex-shrink: 0;
			width: 180rpx;
			font-size: 28rpx;
			font-weight: 500;
			line-height: 38rpx;
			color: #3D3D3D;
			padding:15rpx 0;
		}
	}
	.clue_item_age{
		border-bottom: 2rpx solid rgba(230, 229, 231, 0.7);
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding:0 60rpx;
		.name{
			flex-shrink: 0;
			width: 180rpx;
			font-size: 28rpx;
			font-weight: 500;
			line-height: 38rpx;
			color: #3D3D3D;
		}
		.info{
			width: 100%;
			padding:15rpx 0;
			.age{
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 70rpx;
				.age_name{
					flex-shrink: 0;
					font-size: 28rpx;
					font-weight: normal;
					line-height: 38rpx;
				}
				.input{
					width: 100%;
					border:none;
					font-size: 28rpx;
					line-height: 40rpx;
					text-align: center;
				}
				.placeholder{
					color:rgba(190, 190, 190, 1);
				}
			}
			.birthday{
				display: flex;
				align-items: center;
				justify-content: space-between;
				width: 100%;
				height: 70rpx;
				.birthday_name{
					flex-shrink: 0;
					color: #3D3D3D;
				}
				.birthday_time{
					width: 100%;
					font-size: 28rpx;
					line-height: 40rpx;
					color:rgba(190, 190, 190, 1);
					text-align: right;
					box-sizing: border-box;
					padding-right: 15rpx;
				}
			}
		}
	}
	.clue_item{
		border-bottom: 2rpx solid rgba(230, 229, 231, 0.7);
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 80rpx;
		padding:0 60rpx;
		.name{
			flex-shrink: 0;
			width: 180rpx;
			font-size: 28rpx;
			font-weight: 500;
			line-height: 38rpx;
			color: #3D3D3D;
		}
		.select{
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 100%;
			.text{
				font-size: 28rpx;
				line-height: 38rpx;
				color: #3D3D3D;
				&.hover{
					color:rgba(190, 190, 190, 1);
				}
			}
		}
		.info{
			width: 100%;
			.input{
				width: 100%;
				border:none;
				font-size: 28rpx;
				line-height: 40rpx;
			}
			.placeholder{
				color:rgba(190, 190, 190, 1);
			}
		}
	}
	.head_name{
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding:50rpx 60rpx;
		border-bottom: 2rpx solid rgba(230, 229, 231, 0.7);
		.ph{
			flex-shrink: 0;
			width: 112rpx;
			height: 112rpx;
			border-radius: 50%;
			margin-right: 60rpx;
		}
		.name{
			width: 100%;
			.input{
				width: 100%;
				border:none;
				font-size: 28rpx;
				line-height: 40rpx;
			}
			.placeholder{
				color:rgba(190, 190, 190, 1);
			}
		}
	}
}
</style>
